import { session } from 'js/util'

export default {
  state: {
    legth: (session.get('legth') || 0), // 楼层数量
    needScrolled: (session.get('needScrolled') || [])
  },
  getters: {
    legth: state => state.legth,
    needScrolled: state => state.needScrolled
  },
  actions: {
  },
  mutations: {
    // 更新搜索关键字
    updateChannelLength(state, payload) {
      session.set('legth', payload)
      state.legth = payload
    },
    updateNeedScrolled(state, payload) {
      session.set('needScrolled', payload)
      state.needScrolled = payload
    }
  }
}
